package com.example.mianshi;

public class FileFactory {

    private FileFactory(){}

    public static FileFactory getInstance(){
        return InnFileFactory.fileFactory;
    }

    static class InnFileFactory{
        public static final FileFactory fileFactory = new FileFactory();
    }

    private Object readResolver(){
        return InnFileFactory.fileFactory;
    }

    public MFile createMFile(String [] args){
        if(null != args && args.length > 2){
            MFile file = new MFile(args[0],args[1],Float.valueOf(args[2]));
            return file;
        }
        return new MFile();
    }
}
